package server.main.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;
import server.main.pojo.Permission;
import server.main.pojo.Role;

import java.util.List;

/**
 * @auther MingHsZzz
 * @Date 2022/10/4  15:52
 * @project main
 * @description
 */


@Service("RoleService")
public interface RoleService extends IService<Role> {




    /**
     *获取全部的role
     * @return  List<Role>
     */
    public Page<Role> getRolesByPages(String name, Integer pageNum, Integer pageSize);


    /**
     * 存储role
     * @param role ROle对象
     * @return 是否成功
     */
    public boolean saveRole(Role role);


    /**
     * 根据id删除容了permission
     * @param roleid 角色id
     * @return 是否成功
     */

    public boolean deleteRoleById(String roleid);


    /**
     * 更新role信息
     * @param role role对象
     * @return 是否成功
     */
    public boolean updaterole(Role role);

    /**
     * 获取全部role信息
     * @return List<Role>
     */
    public List<Role> getAllRoles();
}
